$(function () {

        $.ajax({
            type: "GET",
            url: "http://192.168.105.254/api/getgsproduct",
            dataType: "json",
            data: {
                shopid: 1,
                areaid: 1
            },
            success: function (res) {
                console.log(res);
                // console.log(typeof (res));
                var data = res.result;
                console.log(data);
                var str = '';
                $.each(data, function (i, obj) {
                    // console.log(i);
                    console.log(obj);
                    str += '<li>'
                    str += '<a href="gsproductList.html?productId='+obj.productId+'">';
                    str += '<div class="pic">'
                    str += '<img src="' + obj.productImg + '"/></div>';
                    str += '<div class="title">' + obj.productName + '</div>';
                    str += '<div class="lost">'
                    str += '<div class="price">' + obj.productPrice + '</div>';
                    str += '<div class="btn">凑单品</div></div></a></li>';

                });
                $(".product_list > ul").html(str);
            }
        });

    }) 
